<!doctype html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-model="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<pre>
    滑鼠按键修饰符
    .left
    .right
    .middle
    这些修饰符会限制处理程序监听特定的滑鼠按键。
</pre>
<div id="app">

    <button @click.left="left">Left</button>
    <button @click.contextmenu.prevent="right">Right???</button>

</div>
</body>
<script src="../../vender/vue@2.4.2.js"></script>
<script>

    var app=new Vue({
        el:'#app',
        data:{
            code:'',
            txt:'可以用如下修饰符开启鼠标或键盘事件监听，使在按键按下时发生响应。',
            ctrl:''
        },
        methods:{
            left: function (event) {
                console.log('单击了鼠标左键');
            },
            right: function (event) {
                console.log('单击了鼠标右键');
                return false;
            }
        }
    });

</script>
</html>